import service from "@/api/axios";
// 获取图书信息列表
export const getBookListApi = (data) => {
    return service({
        url: "/bookManage",
        method: "GET",
        params: data
    })
}
// 修改图书信息
export const updateBookApi = (data) => {
    return service({
        url: "/bookManage",
        method: "POST",
        data
    })
}
// 添加图书信息
export const addBookApi = (data) => {
    return service({
        url: "/bookManage",
        method: "PUT",
        data
    })
}
// 批量添加
export const addBookListApi = (data) => {
    return service({
        url: "/bookManage/insertBatchBook",
        method: "PUT",
        data
    })
}

// 根据书籍ID查询借阅日志
export const getBorrowByBookApi = (id) => {
    return service({
        url: `/bookManage/getBorrowByBook/${id}`,
        method: "GET",
    })
}
// 删除图书
export const deleteBookApi = (id) => {
    return service({
        url: `/bookManage/${id}`,
        method: "DELETE",
    })
}
